
class Compiler_generic:
	inputprefix=''
	outputprefix='-o'
	objonlyprefix='-c'
	name=''
	def __init__(self,name,inputprefix='',outputprefix='-o',objonlyprefix='-c'):
		self.inputprefix=inputprefix
		self.outputprefix=outputprefix
		self.objonlyprefix=objonlyprefix
		self.name=name

	def compile(self,input,output,flags):
		cmdstr=self.name+' '+self.objonlyprefix+' '+flags+' '
		for i in input:
			cmdstr+=self.inputprefix+i+' '
		cmdstr+=self.outputprefix+output
		print cmdstr
		return os.system(cmdstr)



